package cn.kasa.feign;

import cn.kasa.entity.User;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign> {

    @Override
    public UserFeign create(Throwable throwable) {
        return new UserFeign() {
            @Override
            public User getUserById(Long id) {
                throwable.printStackTrace();
                return User
        };
    }
}
